package com.dodoke.domain;

import com.dodoke.common.annotation.Excel;
import com.dodoke.common.core.domain.BaseEntity;
import com.dodoke.validateGroup.OnAdd;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 【订单】对象 wx_order
 * 
 * @author dodoke
 * @date 2020-08-25
 */
@ApiModel("订单对应的实体类")
public class WxOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @Null(message = "id必须为空",groups = {OnAdd.class})
    private Long id;

    /** 商品id */
    @Excel(name = "商品id")
    @NotNull(message = "goodsId不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品id")
    private Long goodsId;

    /** 用户id */
    @Excel(name = "用户id")
    @NotNull(message = "用户id不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("用户id")
    private Long userId;

    /** 地址id */
    @Excel(name = "地址id")
    @NotNull(message = "地址id不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("地址id")
    private Long addressId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @NotBlank(message = "goodsName不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品名称")
    private String goodsName;

    /** 商品描述 */
    @Excel(name = "商品描述")
    @NotBlank(message = "goodsDescription不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品描述")
    private String goodsDescription;

    /** 商品成本 */
    @Excel(name = "商品成本")
    @NotNull(message = "goodsCostPrice不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品成本")
    private Long goodsCostPrice;

    /** 商品中奖价 */
    @Excel(name = "商品中奖价")
    @NotNull(message = "goodsWinningPrice不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品中奖价")
    private Long goodsWinningPrice;

    /** 商品运费 */
    @Excel(name = "商品运费")
    @NotNull(message = "goodsExpressPrice不允许为空",groups = {OnAdd.class})
    @ApiModelProperty("商品运费")
    private Long goodsExpressPrice;

    /** 订单编号 */
    @Excel(name = "订单编号")
    @Null(groups = {OnAdd.class})
    private String number;

    /** 微信支付流水号 */
    @Excel(name = "微信支付流水号")
    @Null(groups = {OnAdd.class})
    private String payNumber;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public void setGoodsId(Long goodsId)
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }


    public void setGoodsName(String goodsName)
    {
        this.goodsName = goodsName;
    }

    public String getGoodsName() 
    {
        return goodsName;
    }
    public void setGoodsDescription(String goodsDescription)
    {
        this.goodsDescription = goodsDescription;
    }

    public String getGoodsDescription()
    {
        return goodsDescription;
    }

    public Long getGoodsCostPrice() {
        return goodsCostPrice;
    }

    public void setGoodsCostPrice(Long goodsCostPrice) {
        this.goodsCostPrice = goodsCostPrice;
    }

    public void setGoodsWinningPrice(Long goodsWinningPrice)
    {
        this.goodsWinningPrice = goodsWinningPrice;
    }

    public Long getGoodsWinningPrice() 
    {
        return goodsWinningPrice;
    }
    public void setGoodsExpressPrice(Long goodsExpressPrice) 
    {
        this.goodsExpressPrice = goodsExpressPrice;
    }

    public Long getGoodsExpressPrice() 
    {
        return goodsExpressPrice;
    }
    public void setNumber(String number) 
    {
        this.number = number;
    }

    public String getNumber() 
    {
        return number;
    }
    public void setPayNumber(String payNumber) 
    {
        this.payNumber = payNumber;
    }

    public String getPayNumber() 
    {
        return payNumber;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId",getUserId())
            .append("addressId",getAddressId())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("goodsDescription", getGoodsDescription())
            .append("goodsOriginPrice", getGoodsCostPrice())
            .append("goodsWinningPrice", getGoodsWinningPrice())
            .append("goodsExpressPrice", getGoodsExpressPrice())
            .append("number", getNumber())
            .append("payNumber", getPayNumber())
            .toString();
    }
}
